翻訳と辞書
Words near each other
・ Boyeria
・ Boyeria cretensis
・ Boyeria vinosa
・ Boyero, Colorado
・ Boyeros
・ Boyers Junction, Pennsylvania
・ Boyers Landing, California
・ Boyers, Pennsylvania
・ Boyerstown
・ Boyertown Area School District
・ Boyertown, Pennsylvania
・ Boyer–Lindquist coordinates
・ Boyer–Moore
・ Boyer–Moore majority vote algorithm
・ Boyer–Moore string search algorithm
Boyer–Moore–Horspool algorithm
・ Boyes
・ Boyes Hot Springs, California
・ Boyes, Montana
・ Boyet
・ Boyet Bautista
・ Boyet Fernandez
・ Boyett
・ Boyett Petroleum
・ Boyette
・ Boyette Slave House
・ Boyette, Florida
・ Boyeux-Saint-Jérôme
・ Boyfriend
・ Boyfriend (5566 album)


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Boyer–Moore–Horspool algorithm : ウィキペディア英語版
Boyer–Moore–Horspool algorithm

In computer science, the Boyer–Moore–Horspool algorithm or Horspool's algorithm is an algorithm for finding substrings in strings. It was published by Nigel Horspool in 1980.
It is a simplification of the Boyer–Moore string search algorithm which is related to the Knuth–Morris–Pratt algorithm. The algorithm trades space for time in order to obtain an average-case complexity of O(N) on random text, although it has O(MN) in the worst case, where the length of the pattern is M and the length of the search string is N.
==Description==
Like Boyer–Moore, Boyer–Moore–Horspool preprocesses the pattern to produce a table containing, for each symbol in the alphabet, the number of characters that can safely be skipped. The preprocessing phase, in pseudocode, is as follows (for an alphabet of 256 symbols, i.e., bytes):
function preprocess(pattern)
T ← new table of 256 integers
for i from 0 to 256 exclusive
T() ← length(pattern)
for i from 0 to length(pattern) - 1 exclusive
T = needle()
if i = 0
return skip
i ← i - 1
skip ← skip + T[haystack[skip + length(needle) - 1]]
return ''not-found''

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Boyer–Moore–Horspool algorithm」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.